package com.yunxi.service.localService.vehicle;

import com.yunxi.core.service.IServicePlus;
import com.yunxi.model.vehicle.VehicleConfig;
import com.yunxi.vehicle.pojo.VehicleConfigFeatureVO;
import com.yunxi.vehicle.pojo.VehicleConfigInOutColorQueryReqVO;
import com.yunxi.vehicle.pojo.VehicleConfigInOutColorQueryRespVO;

import java.util.List;
import java.util.Map;


public interface VehicleConfigService extends IServicePlus<VehicleConfig> {

    List<VehicleConfigFeatureVO> findConfigFeatureByFamilyCode(String familyCode);

    public boolean delAll();

    void callPInitProduct();

    /**
     * 根据15位码颜色查询 车型默认工程配置
     *
     * @param vehicleCode 15位码
     * @param inCode 内饰
     * @param outCode 外饰
     * @param customPackCode 选装包
     * @param allConfigMap 全量配置 Map<key:特征值,value:特征族>
     * @return Map<key:特征族, value:特征值>
     */
    Map<String, String> loadEngineeringConfigByVehicleCode(String vehicleCode, String inCode, String outCode,
        String customPackCode, Map<String, String> allConfigMap);

    /**
     * 查询全量工程配置
     *
     * @return 工程配置集合
     */
    Map<String, String> loadAllEngineeringConfig();

    /**
     * 校验单车配置是否满足条件
     * @param condition 条件
     * @param configMap 单车配置 Map<key:特征族,value:特征值>
     * @return true or false
     */
    boolean checkIsMeet(String condition ,Map<String,String> configMap);

    /**
     * BOM内外饰配置
     * @param vo
     * @return
     */
    List<VehicleConfigInOutColorQueryRespVO> queryVehicleConfigInColorByApp(VehicleConfigInOutColorQueryReqVO vo);
    /**
     * BOM外饰配置
     * @param vo
     * @return
     */
    List<VehicleConfigInOutColorQueryRespVO> queryVehicleConfigOutColorByApp(VehicleConfigInOutColorQueryReqVO vo);
}
